/*
 * @Description: 语言处理
 * @Version: 2.0
 * @Autor: lhl
 * @Date: 2021-06-20 20:52:26
 * @LastEditors: lhl
 * @LastEditTime: 2021-06-20 21:07:25
 */
import { getLocale } from '../../locales/index'
console.log(getLocale(), 'getLocale')
import { setLanguage } from '../../utils/cookies'
export default {
  state: {
    language: getLocale() || ''
  },
  mutations: {
    setUpLanguage(state, language: string) {
      state.language = language
      setLanguage(state.language)
    }
  },
  getters: {
    language: state => state.language
  }
}
